﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="menu.aspx.cs" Inherits="js组件_jquery_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>

    <script src="jquery-latest-pack.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server" >
    <div>
    
    </div>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="ou" style="width:300px;">
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    <div>
        <span>显示</span>
        <div></div>
    </div>
    </div>
    <script type="text/javascript">
   function showand()
   {
      var actobj= $("#ou");
      var divs = actobj.find("div");
      divs.each(
        function(i)
        {
                divs.eq(i).find("span").click(
                    function()
                    {
                        divs.eq(i).find("div").toggle(1000,function(){
                        if($(this).css("display")=="none")
                        {
                            $(this).parent("div").find("span").get(0).innerHTML ="显示";
                        }
                        else
                        {
                             $(this).parent("div").find("span").get(0).innerHTML="不显示";
                        }
                        });
                        //if none then this text 
                    }
                );
                    divs.eq(i).find("div").append("<span>肥肥,你个大兽人,就知道晓得打我撒.</span><span>肥肥,你个大兽人,就知道晓得打我撒.</span><span>肥肥,你个大兽人,就知道晓得打我撒.</span><span>肥肥,你个大兽人,就知道晓得打我撒.</span><span>肥肥,你个大兽人,就知道晓得打我撒.</span>").css(
                    {
                        backgroundColor:"#ff00ff"
                    }
             ).toggle(2000);
        }
      );
   }
    showand();
    
    

    //add a form to submit 
    $(document).ready(
        
        function()
        {
                $("#out").wrap("<form id=\"formt\"  method=\"post\"  target=\"_blank\"  action=\"JquerynoConfict方法.aspx?id="+Math.random()+"\">"+"</"+"form>").find("input").click(function()
                {
                   $("#out").get(0).innerText+=document.body.innerHTML;
                   document.getElementById("formt").submit();
                });
        }
        )
    </script>
    </form>
    <div id="out"><input id="Submit1" type="submit" value="submit" /></div>
    
</body>
</html>

